package org.objective.base;

import org.objective.service.Loader;

/**
 *
 * @author gus
 */
public interface Storage
{
    public Loader getLoader();
    public SequenceIDGenerator  generator();

    public <T extends BaseObject> T getObject(long id) throws Exception;
    public <T extends BaseObject> T[] getObjects(long[] ids) throws Exception;

    public Long [] getAllObjects() throws Exception;

    public <T extends BaseType> T getType(long typeID) throws Exception;
    public Long [] getAllTypes() throws Exception;

    public PredefinedDataType getPredefineType(long type) throws Exception;

    public void loadMetaData()  throws Exception;

    public DomainObject stubComponent();

    public boolean isStubComponent(DomainObject object);

    public <T extends DomainObject> T createObject(Construction<T> contructor) throws Exception;

    public <T extends DomainObject> T singletonObject(long oid) throws Exception;
}
